package User;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * User: 花海
 * Date: 2022-08-12
 * Time: 22:35
 */
public abstract class User {
    String name;

    public User(String name) {
        this.name = name;
    }
    public abstract int menu();
public static User login(){
    Scanner sc=new Scanner(System.in);
    System.out.println("欢迎使用图书管理系统");
    System.out.println("请输入您的姓名");
    String name=sc.next();
    System.out.println("请选择您的登陆身份 1.管理人员2.借阅人员");
    int choice1=sc.nextInt();
    if(choice1==1){
        return new admin(name);

    }else{
        return new Customer(name);

    }
}


}
